home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / SETUP / US / CBUILDER / DATA.Z / CONTROLS.HPP < prev    next >
C/C++ Source or Header  |  1997-02-13  |  49KB  |  1,139 lines

  1. //----------------------------------------------------------------------------
  2. // Controls.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
  3. // From: Controls.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef ControlsHPP
  6. #define ControlsHPP
  7. //----------------------------------------------------------------------------
  8. #include <Imm.hpp>
  9. #include <CommCtrl.hpp>
  10. #include <Menus.hpp>
  11. #include <Graphics.hpp>
  12. #include <SysUtils.hpp>
  13. #include <Classes.hpp>
  14. #include <Windows.hpp>
  15. #include <Messages.hpp>
  16. #include <System.hpp>
  17. #include <ctl3d.h>
  18.  
  19. #pragma warn -par
  20. #pragma warn -hid 
  21. #pragma warn -inl
  22.  
  23. namespace Controls
  24. {
  25. //-- type declarations -------------------------------------------------------
  26. enum TCursor {crMin=-0x7FFF-1, crMax=0x7FFF};
  27.  
  28. typedef Messages::TWMNoParams  TCMActivate;
  29.  
  30. typedef Messages::TWMNoParams  TCMDeactivate;
  31.  
  32. typedef Messages::TWMNoParams  TCMGotFocus;
  33.  
  34. typedef Messages::TWMNoParams  TCMLostFocus;
  35.  
  36. typedef Messages::TWMKey  TCMDialogKey;
  37.  
  38. typedef Messages::TWMKey  TCMDialogChar;
  39.  
  40. typedef Messages::TWMNCHitTest  TCMHitTest;
  41.  
  42. typedef Messages::TWMNoParams  TCMEnter;
  43.  
  44. typedef Messages::TWMNoParams  TCMExit;
  45.  
  46. typedef Messages::TWMMouse  TCMDesignHitTest;
  47.  
  48. typedef Messages::TWMKey  TCMWantSpecialKey;
  49.  
  50. class __declspec(delphiclass) TControl;
  51. class __declspec(delphiclass) TWinControl;
  52. typedef void __fastcall (__closure *TWndMethod)(Messages::TMessage &Message);
  53.  
  54. enum Controls_7 { csAcceptsControls, csCaptureMouse, csDesignInteractive, csClickEvents, csFramed, csSetCaption, 
  55.     csOpaque, csDoubleClicks, csFixedWidth, csFixedHeight, csNoDesignVisible, csReplicatable, csNoStdEvents, 
  56.     csDisplayDragImage };
  57.  
  58. typedef Set<Controls_7, csAcceptsControls, csDisplayDragImage>  TControlStyle;
  59.  
  60. enum Controls_6 { csLButtonDown, csClicked, csPalette, csReadingState, csAlignmentNeeded, csFocusing, 
  61.     csCreating, csPaintCopy };
  62.  
  63. typedef Set<Controls_6, csLButtonDown, csPaintCopy>  TControlState;
  64.  
  65. enum TAlign { alNone, alTop, alBottom, alLeft, alRight, alClient };
  66.  
  67. enum TDragMode { dmManual, dmAutomatic };
  68.  
  69. enum Controls_8 { sfLeft, sfTop, sfWidth, sfHeight, sfFont };
  70.  
  71. typedef Set<Controls_8, sfLeft, sfFont>  TScalingFlags;
  72.  
  73. enum TMouseButton { mbLeft, mbRight, mbMiddle };
  74.  
  75. typedef void __fastcall (__closure *TMouseEvent)(System::TObject* Sender, TMouseButton Button, Classes::TShiftState 
  76.     Shift, int X, int Y);
  77.  
  78. typedef void __fastcall (__closure *TMouseMoveEvent)(System::TObject* Sender, Classes::TShiftState Shift
  79.     , int X, int Y);
  80.  
  81. typedef void __fastcall (__closure *TDragDropEvent)(System::TObject* Sender, System::TObject* Source
  82.     , int X, int Y);
  83.  
  84. enum TDragState { dsDragEnter, dsDragLeave, dsDragMove };
  85.  
  86. typedef void __fastcall (__closure *TDragOverEvent)(System::TObject* Sender, System::TObject* Source
  87.     , int X, int Y, TDragState State, bool &Accept);
  88.  
  89. class __declspec(delphiclass) TDragObject;
  90. typedef void __fastcall (__closure *TStartDragEvent)(System::TObject* Sender, TDragObject* &DragObject
  91.     );
  92.  
  93. typedef void __fastcall (__closure *TEndDragEvent)(System::TObject* Sender, System::TObject* Target, 
  94.     int X, int Y);
  95.  
  96. struct TCMDrag;
  97. typedef System::AnsiString TCaption;
  98.  
  99. class __declspec(delphiclass) TCustomImageList;
  100. class __declspec(pascalimplementation) TControl : public Classes::TComponent
  101. {
  102.     typedef Classes::TComponent inherited;
  103.     
  104. private:
  105.     TWinControl* FParent;
  106.     TWndMethod FWindowProc;
  107.     int FLeft;
  108.     int FTop;
  109.     int FWidth;
  110.     int FHeight;
  111.     TControlStyle FControlStyle;
  112.     TControlState FControlState;
  113.     bool FVisible;
  114.     bool FEnabled;
  115.     bool FParentFont;
  116.     bool FParentColor;
  117.     TAlign FAlign;
  118.     TDragMode FDragMode;
  119.     bool FIsControl;
  120.     char *FText;
  121.     Graphics::TFont* FFont;
  122.     Graphics::TColor FColor;
  123.     TCursor FCursor;
  124.     TCursor FDragCursor;
  125.     Menus::TPopupMenu* FPopupMenu;
  126.     System::AnsiString FHint;
  127.     int FFontHeight;
  128.     TScalingFlags FScalingFlags;
  129.     bool FShowHint;
  130.     bool FParentShowHint;
  131.     TMouseEvent FOnMouseDown;
  132.     TMouseMoveEvent FOnMouseMove;
  133.     TMouseEvent FOnMouseUp;
  134.     TDragDropEvent FOnDragDrop;
  135.     TDragOverEvent FOnDragOver;
  136.     TStartDragEvent FOnStartDrag;
  137.     TEndDragEvent FOnEndDrag;
  138.     Classes::TNotifyEvent FOnClick;
  139.     Classes::TNotifyEvent FOnDblClick;
  140.     void __fastcall CheckMenuPopup(const Windows::TSmallPoint Pos);
  141.     void __fastcall DoDragMsg(TCMDrag &DragMsg);
  142.     void __fastcall DoMouseDown(Messages::TWMMouse &Message, TMouseButton Button, Classes::TShiftState 
  143.         Shift);
  144.     void __fastcall DoMouseUp(Messages::TWMMouse &Message, TMouseButton Button);
  145.     void __fastcall FontChanged(System::TObject* Sender);
  146.     Windows::TRect __fastcall GetBoundsRect(void);
  147.     int __fastcall GetClientHeight(void);
  148.     int __fastcall GetClientWidth(void);
  149.     bool __fastcall GetMouseCapture(void);
  150.     System::AnsiString __fastcall GetText(void);
  151.     void __fastcall InvalidateControl(bool IsVisible, bool IsOpaque);
  152.     bool __fastcall IsColorStored(void);
  153.     bool __fastcall IsFontStored(void);
  154.     bool __fastcall IsShowHintStored(void);
  155.     void __fastcall ReadIsControl(Classes::TReader* Reader);
  156.     void __fastcall RequestAlign(void);
  157.     void __fastcall SetAlign(TAlign Value);
  158.     void __fastcall SetBoundsRect(const Windows::TRect &Rect);
  159.     void __fastcall SetClientHeight(int Value);
  160.     void __fastcall SetClientSize(const POINT &Value);
  161.     void __fastcall SetClientWidth(int Value);
  162.     void __fastcall SetColor(Graphics::TColor Value);
  163.     void __fastcall SetCursor(TCursor Value);
  164.     void __fastcall SetEnabled(bool Value);
  165.     void __fastcall SetFont(Graphics::TFont* Value);
  166.     void __fastcall SetHeight(int Value);
  167.     void __fastcall SetLeft(int Value);
  168.     void __fastcall SetMouseCapture(bool Value);
  169.     void __fastcall SetParentColor(bool Value);
  170.     void __fastcall SetParentFont(bool Value);
  171.     void __fastcall SetShowHint(bool Value);
  172.     void __fastcall SetParentShowHint(bool Value);
  173.     void __fastcall SetPopupMenu(Menus::TPopupMenu* Value);
  174.     void __fastcall SetText(const System::AnsiString Value);
  175.     void __fastcall SetTop(int Value);
  176.     void __fastcall SetVisible(bool Value);
  177.     void __fastcall SetWidth(int Value);
  178.     void __fastcall SetZOrderPosition(int Position);
  179.     void __fastcall WriteIsControl(Classes::TWriter* Writer);
  180.     MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
  181.     MESSAGE void __fastcall WMNCLButtonDown(Messages::TWMNCHitMessage &Message);
  182.     MESSAGE void __fastcall WMRButtonDown(Messages::TWMMouse &Message);
  183.     MESSAGE void __fastcall WMMButtonDown(Messages::TWMMouse &Message);
  184.     MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
  185.     MESSAGE void __fastcall WMRButtonDblClk(Messages::TWMMouse &Message);
  186.     MESSAGE void __fastcall WMMButtonDblClk(Messages::TWMMouse &Message);
  187.     MESSAGE void __fastcall WMMouseMove(Messages::TWMMouse &Message);
  188.     MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Message);
  189.     MESSAGE void __fastcall WMRButtonUp(Messages::TWMMouse &Message);
  190.     MESSAGE void __fastcall WMMButtonUp(Messages::TWMMouse &Message);
  191.     MESSAGE void __fastcall WMCancelMode(Messages::TWMNoParams &Message);
  192.     MESSAGE void __fastcall CMVisibleChanged(Messages::TMessage &Message);
  193.     MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
  194.     MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
  195.     MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
  196.     MESSAGE void __fastcall CMParentFontChanged(Messages::TMessage &Message);
  197.     MESSAGE void __fastcall CMParentColorChanged(Messages::TMessage &Message);
  198.     MESSAGE void __fastcall CMParentShowHintChanged(Messages::TMessage &Message);
  199.     MESSAGE void __fastcall CMHitTest(Messages::TWMNCHitTest &Message);
  200.     MESSAGE void __fastcall CMMouseEnter(Messages::TMessage &Message);
  201.     MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
  202.     MESSAGE void __fastcall CMDesignHitTest(Messages::TWMMouse &Message);
  203.     
  204. protected:
  205.     virtual void __fastcall ChangeScale(int M, int D);
  206.     virtual void __fastcall Click(void);
  207.     virtual void __fastcall DblClick(void);
  208.     virtual void __fastcall DefaultHandler(void *Message);
  209.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  210.     virtual void __fastcall DragCa